package cn.itcast.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

//控制器类
@Controller
@RequestMapping(path = "/user")
public class HelloController {

    /**
     * 入门案例
     * @return
     */
    @RequestMapping(path="/hello")
    public String saveHello(){
        System.out.println("hello.springmvc");
    return "success";
    }

    /**
     * 注解
     * @return
     */
    @RequestMapping(path = "/testRequestMapping")
    public String testRequest(){
        System.out.println("测试RequrestMapping注解");
        return "success";
    }

}
